<?php
/**
 * Index controller
 * 
 * @author Konstantin Shamko <konstantin.shamko@gmail.com> 
 * @version 0.0.1
 * @copyright  Copyright (c) 2009 Konstantin Shamko
 * @category VaselinEngine
 * @package Default Module
 * @subpackage Controller
 * @license  New BSD License
 *
 */
class IndexController extends Bel_Controller{	

	/**
	 * This action runs if module-controller-action is not defined 
	 *
	 */
	public function indexAction(){
		
		
		if (! ($homepage = $this->_cache->load ( 'page_homepage' ))) {
			$oPages = new Models_Content_Pages();
			$homepage = $oPages->getPageBySystemName('homepage');
			$this->_cache->save ( $homepage );
		}
		
		$this->view->assign('homepage',$homepage);
		$this->view->display('default/default.tpl');
	}	
}